﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace eLoan.Models
{
    [Table("LoanCollateral")]
    public class LoanCollateral : LoanCollateralFields
    { }

    public class LoanCollateralModel
    {
        public LoanCollateral LoanCollateral  { get; set; }

        public string DBCommand { get; set; }

        public string DocumentNo { get; set; }

        public int BorrowerID { get; set; }

        public string BorrowerName { get; set; }

        public string BranchCode { get; set; }
    }

    public class LoanCollateralFields
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Display(Name = "ID")]
        public int ID { get; set; }

        [Required]
        [Display(Name = "Document No")]
        [StringLength(50)]
        public string DocumentNo { get; set; }

        [Required]
        [Display(Name = "Make / Type")]
        [StringLength(200)]
        public string MakeOrType { get; set; }

        [Display(Name = "Brand / File No")]
        [StringLength(200)]
        public string BrandOrFileNo { get; set; }

        [Display(Name = "Serial / Plate No")]
        [StringLength(200)]
        public string SerialOrPlateNo { get; set; }

        [Required]
        [Display(Name = "Amount")]
        public decimal Amount { get; set; }
    }

}